home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11878 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.5 KB

  1. Path: druid.borland.com!usenet
  2. From: pete@borland.com (Pete Becker)
  3. Newsgroups: comp.object,comp.lang.c++,comp.lang.java
  4. Subject: Re: Java: What's the Big Deal?
  5. Date: 16 Mar 1996 20:50:52 GMT
  6. Organization: Borland International
  7. Message-ID: <4if9jc$rkm@druid.borland.com>
  8. References: <4i40ik$9dt@news4.digex.net> <milodDo5yDE.H8B@netcom.com>
  9. NNTP-Posting-Host: pbecker.borland.com
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=ISO-8859-1
  12. X-Newsreader: WinVN 0.99.5
  13.  
  14. In article <milodDo5yDE.H8B@netcom.com>, milod@netcom.com says...
  15. >
  16. >ell@access1.digex.net (Ell) writes:
  17. >
  18. >>What is you can do in Java, you can't do as easily with a library in C++? 
  19. >
  20. >Write applets the run on the Web (duh! :-) Folklore has it
  21. >that Sun couldn't even interest anyone in Oak until the
  22. >applet idea came around.  Suddenly, everybody wants some.
  23. >
  24.  
  25. There's no reason you can't write a C++ compiler that generates a Java 
  26. bytestream.
  27.  
  28. >Seriously: The 2nd most notable thing about Java may be the
  29. >JVM.  Developers can write programs that are binary compatible
  30. >on a variety of platforms and operating systems (remember JF?).
  31. >
  32.  
  33. Once again, there's no reason you can't write a C++ compiler that targets the 
  34. Java virtual machine.
  35.  
  36. >Actually, the Smalltalk uh...afficianados have been saying
  37. >"we had a virtual machine first!", but the interesting
  38. >difference is that the JVM is standard across Java compilers
  39. >(and some other language compilers) which provides the
  40. >portability.  Something Smalltalk has never really had.
  41. >
  42. >Other merely practical advantages (for certain kinds of apps)
  43. >include:
  44. >
  45. >1) Trade speed for safety (no pointer arithmetic + GC +
  46. >   all casts dynamically checked + array bounds + ...)
  47. >   This makes it a bit easier to program in than C++.
  48. >
  49.  
  50. Huh? Why can't you make these tradeoffs in C++? In fact, the problem is just 
  51. the opposite: you can't make these tradeoffs in Java because it does not let 
  52. you use pointers or handle your own memory management. This means you cannot 
  53. decide that speed is more important than safety.
  54.  
  55. >2) No header files => faster compilation
  56. >
  57.  
  58. Nonsense. Header files are simply text that gets included where you want it. If 
  59. you write the same code without header files it will not magically compile 
  60. faster.
  61.  
  62. >3) Slightly simpler syntax (mostly due to the lack of
  63. >   address operators, function pointers, and templates)
  64. >
  65.  
  66. Yup. The question, of course, is what this does to the expressive power of the 
  67. language.
  68.  
  69. >4) Standard library comes with the language - which is
  70. >   still not quite true of C++.
  71.  
  72.